home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / utils2 / maint110.zip / README.TXT < prev    next >
Text File  |  1994-05-05  |  7KB  |  161 lines

  1. This is a small utility to modify any kind of INI-Files.
  2.  
  3. It is DOS-based, so you can easily do the modifications from your
  4. batchfile or your network login script.
  5.  
  6. As example, you can add the TimerCriticalSection=10000 for all users
  7. in the SYSTEM.INI file, just by doing the following:
  8.  
  9. Create a file named SYSTEM.CMD which contains:
  10. +[386enh]TimerCriticalSection=10000
  11.  
  12. And put the following command in you (system) login script:
  13. maintini.exe N:\WINDOWS\SYSTEM.INI SYSTEM.CMD
  14.  
  15. After the new login, all your users have the new parameter set correctly
  16. for the new WINUP9 from Novell.
  17.  
  18. A backupfile with the extension .BAK is made before modifying the file.
  19. Normaly all section, keys and values are NOT case sensitive.
  20. However _ and * give the possibility to match only if the case matches too.
  21.  
  22. MAINTINI can process INI-Files of any size, even larger than 64kBytes.
  23. Just the CMD File should not have to much commands, because a dynamic list
  24. with all commands is created. (The actual upper limit are 600 commands,
  25. if you need more, then send me a mail or just splitt it in two cmd-files.
  26. Anyway, to process a INI-file with 600 commands to apply is just slow.)
  27.  
  28. Commands of Maintini:
  29.  
  30. -[section]                The corresponding section is deleted
  31. -[section]Key             The Key in section will be deleted
  32. -[section]Key=Value       The Key is only deleted if the Value matches exactly
  33.                           This is used to delete device=... lines in system.ini
  34. _[section]Key=Value       Same as - but Value is case sensitive
  35.                           Normaly not used.
  36.  
  37. #[section]                The corresponding section is commented
  38. #[section]Key             The Key in section will be commented
  39. #[section]Key=Value       The Key is only commented if the Value matches exactly
  40.                           This is used to comment device=... lines in system.ini
  41. @[section]                The ; in front of the corresponding section is removed
  42. @[section]Key             The ; in front of the Key in section is removed
  43. @[section]Key=Value       The ; in front of the Key is removed, if the Value matches exactly
  44.                           This is used to uncomment device=... lines in system.ini
  45.  
  46. +[Section]Key=            Adds Key in Section.
  47. +[Section]Key=Value       Adds Key and Value to section.
  48. &[Section]Key=Value       This Key/Value is always inserted, even if already
  49.                           a key exists, but with a different value. Used to
  50.                           insert device=... lines in System.ini
  51. *[Section]Key=Value       Same as &, but the value is casesensitive
  52.                           Normaly not used.
  53.  
  54. ![Section]Key=Value       A key is inserted in section, but a numeric value is added to
  55.                           Key, representing the highest+1 value of Key.
  56.                           (Only ?) used for Progman.ini to add new program groups
  57.                           [Section]
  58.                           Key1=Value1
  59.                           Key2=Value2
  60.                           Key3=Value3
  61.  
  62.                           ![Section]Key=ValueZ
  63.  
  64.                           Gives
  65.                           [Section]
  66.                           Key1=Value1
  67.                           Key2=Value2
  68.                           Key3=Value3
  69.                           Key4=ValueZ
  70.  
  71.                           If the command in ![Section]Key=Value2 then
  72.                           the line is not duplicated.
  73.                           You can add multiple ! entrys per Section/Key pair in one pass
  74.  
  75. >[Section]Key= Value      Adds Value to an existing value. The old Value is preserved
  76.                           and the Value is added added at the end of the line.
  77.                           
  78.                           [Section]
  79.                           Key=Value0
  80.  
  81.                           >[Section]Key= Value1
  82.  
  83.                           Gives
  84.                           [Section]
  85.                           Key=Value0 Value1
  86.                           
  87.                           It is very important, that you have a space or a period sign
  88.                           before the Value, this is to ensure that the , sign is placed
  89.                           at the right place (or even ignored if this is the first value).
  90.  
  91. <[Section]Key=Value       Deletes Value from the Key/Value line. Leading and trailing 
  92.                           period-signs are cut off.
  93.  
  94. r[Section]Original=NewValue The string <Original> is replaced with <NewValue>, but only in
  95.                             if [Section] is the current one. If you want to replace the
  96.                             Original in ALL sections (even in the section definition) then
  97.                             specify [] as the section. 
  98.  
  99. R[Section]Original=NewValue Same as r command, but the case must match.
  100.  
  101.  
  102. You should not use more than one < or > command for each Section/Key !!!!
  103. This does not behave correctly. If this is a limitation for you, 
  104. then you can tell me why you want another version who can do this.
  105. I will then implement it, if I find the time to do it.
  106.  
  107. In ALL Value-strings, you can insert a sequence %...%, to replace the
  108. text with the content of an DOS environment variable.
  109.  
  110. +[boot]run=F:\USER\%USER%\WINDOWS\CAL.EXE
  111.  
  112. %USER%  will be replaced with the value of the USER - Environment variable.
  113.  
  114. When It finds a single % in the line then the % remains in the value.
  115.  
  116. If it finds %%, then it is replaced with a single %.
  117. So you can use F:\USR\%%USER%%\TEMP to be transformed into
  118. F:\USR\%USER%\TEMP. If you simply use F:\USR\%USER%\TEMP it will
  119. try to replace %USER% with the corresponing environment variable.
  120. You must use this, every time you have more than one % sign
  121. in the value, but don't want to replace it.
  122.  
  123. If the specified environment variable does not exist, then a warning message
  124. is displayed on the screen, and the %...% is removed from the value.
  125.  
  126.  
  127. When you want to rename a section, then do the following:
  128. r[][OldSectionName]=[NewSectionName]
  129. Maintini then looks in each line for the Old-name and if it finds it,
  130. it replaces it with the new name. You should include the [..] to be
  131. shure, that only section headings are replaced.
  132.  
  133. With the r command it is very easy to move a program/library to a new loaction.
  134. Of course you must take care to correct all other references to that location.
  135. (In the registeration database OLE, in DDE-statements and of course the
  136.  program icon in the program manager.)
  137.  
  138. MAINTINI is emailware, which means if you find this program usefull,
  139. you should send me a email. (Or a nice postcard if you don't have
  140. acess to a email system)
  141.  
  142. If you send me a message, then I will inform you of all changes and
  143. new versions of this utility.
  144.  
  145.  
  146. My email adress:
  147.  
  148. Compuserve   :  100034,3536 Andre Schild
  149. Internet     :  100034.3536@compuserve.com
  150. AT&T Mail    :  mhs!csmail!100034.3536
  151. X400         :  /c=US/ad=compuserve/pd=csmail/d.id=100034.3536
  152. MCI          :  TO: Andre Schild   
  153.                 EMS: COMPUSERVE/ MCI ID:281-6320
  154.                 MBX: 100034,3536
  155. MHS          :  MAIL@CSERVE {100034,3536}
  156.  
  157. Postal adress:  Andre Schild
  158.                 Pfeidstrasse 8
  159.                 CH-2555 Bruegg b. Biel
  160.                 Switzerland
  161.